package com.example.demo.mapper;

import com.example.demo.domain.dao.ApiErrorLog;
import com.example.demo.domain.dao.ApiResultLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author hongjinhui
 */
@Mapper
public interface ApiLogDao {
    @Insert("INSERT INTO api_result_log(task_id, path, request, result, time) VALUES(#{taskId}, #{path}, #{request}, #{result}, #{time})")
    void insertApiResultLog(ApiResultLog apiResultLog);


    @Insert("INSERT INTO api_error_log (task_id,path,request,error_task,error_message) VALUES (#{taskId},#{path},#{request},#{errorTask},#{errorMessage})")
    void insertApiErrorLog(ApiErrorLog apiErrorLog);
}

